<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="renderer" content="webkit">
  <title>LAYUI ADMIN</title>
  <link href="./assets/favicon.ico" type="image/x-icon" rel="shortcut icon">
  <!-- style -->
  <link href="https://www.layuicdn.com/layui/css/layui.css" type="text/css" rel="stylesheet">
  <link href="./css/admin.css" type="text/css" rel="stylesheet">
  <style>
    #layApp {
      height: 100vh; /* 这个样式可删可不删 */
    }
  </style>
</head>

<body class="layui-layout-body">
  <article id="layApp" class="layui-layout-admin">
    <header class="layui-header">
      <ul class="layui-nav layui-layout-right" lay-bar="disabled">
        <li class="layui-nav-item" lay-unselect>
          <a>
            <i class="layui-icon layui-icon-notice"></i>
            <span class="layui-badge-dot"></span>
          </a>
        </li>
        <li layadmin-event="fullscreen" class="layui-nav-item layui-hide-xs" lay-unselect>
          <a>
            <i class="layui-icon layui-icon-screen-full"></i>
          </a>
        </li>
        <li class="layui-nav-item" lay-unselect>
          <a>管理员</a>
          <dl class="layui-nav-child layui-nav-child-r">
            <dd layadmin-event="center" lay-unselect><a>个人中心</a></dd>
            <dd layadmin-event="password" lay-unselect><a>修改密码</a></dd>
            <hr>
            <dd layadmin-event="logout" lay-unselect><a>退出</a></dd>
          </dl>
        </li>
        <li layadmin-event="setter" lay-tips="" class="layui-nav-item" lay-unselect>
          <a href="javascript:;">
            <i class="layui-icon layui-icon-more-vertical"></i>
          </a>
        </li>
      </ul>
    </header>

    <aside class="layui-side">
      <!-- logo -->
      <div class="layui-logo" lay-href="">
        <img src="./assets/logo.png">
        <span>layui admin</span>
      </div>
      <!-- navmenu -->
      <div class="layui-side-scroll">
        <template id="layadmin-side"></template>
      </div>
      <!-- toggle -->
      <ul class="layui-nav layui-nav-tree layadmin-side-toggle" lay-bar="disabled">
        <li class="layui-nav-item" lay-unselect>
          <a>
            <i class="layui-icon layui-icon-shrink-right"></i>
          </a>
        </li>
      </ul>
    </aside>

    <main class="layui-body layui-tab has-footer" id="layadmin-pagetabs" lay-unauto lay-allowclose="true">
      <ul class="layui-tab-title layui-hide">
        <li class="layui-this" lay-id="0101" lay-attr="home/index.html" lay-lock="true">
          <i class="layui-icon layui-icon-home"></i>
        </li>
      </ul>
      <!-- 页面部分 -->
      <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
          <iframe src="./views/home/0001.html" allowfullscreen="true" frameborder="0"></iframe>
        </div>
      </div>
    </main>

    <footer class="layui-footer layui-tree-emptyText">
      <span>layuiAdmin</span>
      <svg viewBox="64 64 896 896" focusable="false" data-icon="github" width="1em" height="1em" fill="currentColor" aria-hidden="true">
        <path d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"></path>
      </svg>
    </footer>
  </article>

  <script src="https://www.layuicdn.com/layui/layui.js"></script>
  <script>
    layui.config({
      base: './js/'
    }).extend({
      index: 'index',
      basicLayout: 'layout/index'
    }).use([
      'jquery',
      'element',
      // 注意顺序，后面依赖前面的模块，这里 basicLayout 就依赖 index
      'index',
      // basicLayout 是一个加载 layout 文件夹内模块的脚本
      // 可以使用 layui.basicLayout.[xxx]
      // 也可以直接使用各个模块，以 layui.GlobalXXX 开头
      'basicLayout'
    ], function() {
      var $ = layui.jquery;
      var element = layui.element;
      var GlobalSider = layui.GlobalSider;

      $.get('./mock/navmenu.json', function(res) {
        // 渲染侧边栏
        GlobalSider.render('.layui-side-scroll', res, {
          success: function(id) {
            GlobalSider.addAnimationEffect(id, true);
          }
        });
      });

      // $('#layadmin-pagetabs-header').niceScroll({
      //   touchbehavior: false,
      //   cursorwidth: '6px',
      //   cursorcolor: '#909399',
      //   cursoropacitymax: 1,
      //   cursorborder: 0,
      //   cursorborderradius: '4px',
      //   autohidemode: 'leave'
      // });
    });
  </script>
</body>

</html>
